package com.speily.cloud.order.exception;

import java.io.Serializable;

/**
 * 业务层异常
 *
 * @author : SPL
 * @since : 2020-07-30 17:40
 **/
public class OrderException extends RuntimeException implements Serializable {


    private static final long serialVersionUID = 5782923433032959765L;
    private Integer code;

    private String message;

    public OrderException(String message) {
        this.code = 403;
        this.message = message;
    }

    public OrderException(String message, Integer code) {
        this.message = message;
        this.code = code;
    }

    public OrderException(String message, Throwable e) {
        super(message, e);
        this.message = message;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public Integer getCode() {
        return code;
    }
}

